package com.homedo.microservice.open.service.gateway.manager.web.api;

import com.homedo.common.bean.data.RequestData;
import com.homedo.common.bean.data.ResponseData;
import com.homedo.microservice.open.service.gateway.manager.web.api.bean.model.req.ServcieGatewayPageAReq;
import com.homedo.microservice.open.service.gateway.manager.web.api.bean.model.req.ServiceGatewayAddAReq;
import com.homedo.microservice.open.service.gateway.manager.web.api.bean.model.req.ServiceGatewayDeleteAReq;
import com.homedo.microservice.open.service.gateway.manager.web.api.bean.model.req.ServiceGatewayUpdateAReq;
import com.homedo.microservice.open.service.gateway.manager.web.api.bean.model.resp.ServiceGatewayAResp;
import com.homedo.microservice.open.service.gateway.manager.web.api.bean.model.resp.ServiceGatewayPageAResp;
import com.homedo.microservice.open.service.gateway.manager.web.api.constant.RemoteService4OpenServiceGatewayManagerWebServiceConstant;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping(RemoteService4OpenServiceGatewayManagerWebServiceConstant.SERVICE_ID + "")
public interface IServiceGatewayServiceRemote {

    @PostMapping(value = "list")
    ResponseData<ServiceGatewayPageAResp> list(RequestData<ServcieGatewayPageAReq> requestData);

    @GetMapping(value = "list/distinct")
    ResponseData<ServiceGatewayPageAResp> listDistinct(String likeComment);

    @GetMapping(value = "detail/{gateway}")
    ResponseData<ServiceGatewayPageAResp> detail(String gateway);

    @GetMapping(value = "detail/{gateway}/{env}")
    ResponseData<ServiceGatewayPageAResp> detail(String gateway, String env);

    @PostMapping(value = "add")
    ResponseData<ServiceGatewayAResp> add(RequestData<ServiceGatewayAddAReq> requestData);

    @PostMapping(value = "addDetail")
    ResponseData<ServiceGatewayAResp> addDetail(RequestData<ServiceGatewayAddAReq> requestData);

    @PostMapping(value = "update")
    ResponseData update(RequestData<ServiceGatewayUpdateAReq> requestData);

    @PostMapping(value = "update/hystrixUrl")
    ResponseData updateHystrixUrl(RequestData<ServiceGatewayUpdateAReq> requestData);

    @PostMapping(value = "delete")
    ResponseData delete(RequestData<ServiceGatewayDeleteAReq> requestData);

}
